home *** CD-ROM | disk | FTP | other *** search
/ Digital Pose Collection / Digital Pose Collection.iso / mac / POSE / DATA / MAIN.DXR / 00004_Program.ls next >
Encoding:
Text File  |  1996-06-18  |  6.4 KB  |  234 lines

  1. global gtemplist, gfilename, gframe, gichi, gface, gcount, gindexlist, gindex, gqtcastnum, ggroupcastnum, gbookcastnum, gbookname, ggroupname, gmax, gfindlist, gbackframe, gfindflg, gcursorposlist, gpagesu, gpagemod, gpage, gnowpos, gmovh, gloch, gfacecastnum, gqtrate
  2.  
  3. on startMovie
  4.   initglobals()
  5.   clearsprite()
  6.   put " " into field "fld.total"
  7.   put " " into field "fld.page"
  8.   if the machineType = 256 then
  9.     set the textFont of field "fld.total" to "テ‡lテ‡r テ唄テ鰻テ叡テ丑"
  10.     set the textFont of field "fld.page" to "テ‡lテ‡r テ唄テ鰻テ叡テ丑"
  11.   else
  12.     set the textFont of field "fld.total" to "osaka"
  13.     set the textFont of field "fld.page" to "osaka"
  14.   end if
  15. end
  16.  
  17. on initglobals
  18.   clearGlobals()
  19.   set gtemplist to []
  20.   set gfindlist to []
  21.   set gindexlist to [100, 30, 1]
  22.   set gindex to 131
  23.   set gfilename to EMPTY
  24.   set ggroupname to 1
  25.   set gframe to 1
  26.   set gichi to 1
  27.   set gcount to count(gfindlist)
  28.   set gqtcastnum to 1
  29.   set gbookcastnum to 2
  30.   set ggroupcastnum to 3
  31.   set gfacecastnum to 100
  32.   set gmax to count(gfindlist)
  33.   set gcursorposlist to [125, 125, 125]
  34.   set gpagesu to 1
  35.   set gpage to 1
  36.   set gpagemod to 0
  37.   set gloch to 80
  38.   set gmovh to 64
  39.   set gqtrate to 2
  40.   find(gindex)
  41.   set the loop of cast 1 to 1
  42. end
  43.  
  44. on keyDown
  45.   set avol to the soundLevel
  46.   if (the key = "+") and (avol < 7) then
  47.     set avol to avol + 1
  48.     set the soundLevel to avol
  49.   end if
  50.   if (the key = "-") and (avol > 1) then
  51.     set avol to avol - 1
  52.     set the soundLevel to avol
  53.   end if
  54. end
  55.  
  56. on setglobals anum
  57.   set gichi to line anum of field "Ichi"
  58.   set gface to line anum of field "face"
  59.   set gfilename to line anum of field "filename"
  60.   set ggroupname to line anum of field "Group"
  61.   set gbookname to line anum of field "booknamecast"
  62.   set gframe to line anum of field "frame"
  63.   set gcount to count(gfindlist)
  64. end
  65.  
  66. on find vindex
  67.   set gfindlist to []
  68.   set atemptext to the text of field ("index" & string(vindex))
  69.   repeat with n = 1 to the number of lines in atemptext - 1
  70.     add(gfindlist, value(line n of atemptext))
  71.   end repeat
  72.   set gcount to count(gfindlist)
  73.   set gpagesu to gcount / 8
  74.   set gpagemod to gcount mod 8
  75.   set gpage to 1
  76.   if gpagemod > 0 then
  77.     set gpagesu to gpagesu + 1
  78.   end if
  79. end
  80.  
  81. on gfind vgroup
  82.   set gtemplist to []
  83.   set atemptext to the text of field ("group" & string(vgroup))
  84.   repeat with n = 1 to the number of lines in atemptext - 1
  85.     add(gtemplist, value(line n of atemptext))
  86.   end repeat
  87.   set the fileName of cast gbookcastnum to gbookname & ".pct"
  88.   set the fileName of cast ggroupcastnum to vgroup & ".pct"
  89.   set gframe to count(gtemplist)
  90.   repeat with n = 1 to gframe
  91.     set the picture of cast (50 + n) to the picture of cast (getAt(gtemplist, n) + 100)
  92.   end repeat
  93. end
  94.  
  95. on flashbtn
  96.   puppetSound("click")
  97.   set alocv to the locV of sprite clickOn()
  98.   set aloch to the locH of sprite clickOn()
  99.   puppetSprite(clickOn(), 1)
  100.   set the locV of sprite clickOn() to alocv + 2
  101.   set the locH of sprite clickOn() to aloch + 2
  102.   updateStage()
  103.   delay(10)
  104.   set the locV of sprite clickOn() to alocv
  105.   set the locH of sprite clickOn() to aloch
  106.   updateStage()
  107.   puppetSprite(clickOn(), 0)
  108. end
  109.  
  110. on movecursor vspritenum
  111.   set aloch to the locH of sprite the clickOn
  112.   set the locH of sprite vspritenum to aloch
  113.   setAt(gcursorposlist, vspritenum - 1, aloch)
  114. end
  115.  
  116. on setcursor
  117.   repeat with n = 2 to 4
  118.     set the locH of sprite n to getAt(gcursorposlist, n - 1)
  119.   end repeat
  120. end
  121.  
  122. on setkanban
  123.   set the fileName of cast gqtcastnum to gfilename & ".mov"
  124.   set the fileName of cast ggroupcastnum to ggroupname & ".pct"
  125.   set the fileName of cast gbookcastnum to gbookname & ".pct"
  126. end
  127.  
  128. on clearsprite
  129.   repeat with n = 1 to 48
  130.     puppetSprite(n, 0)
  131.     set the visible of sprite n to 1
  132.   end repeat
  133. end
  134.  
  135. on miniqtslider vloch, vmovh
  136.   set gloch to vloch
  137.   set the locV of sprite 6 to 368
  138.   set gmovh to vmovh
  139.   set the movieRate of sprite 6 to 0
  140.   puppetSprite(6, 1)
  141.   set the stretch of sprite 6 to 1
  142.   if gichi = 1 then
  143.     set the width of sprite 6 to 31
  144.     set the height of sprite 6 to 48
  145.   else
  146.     if gframe = 8 then
  147.       set the width of sprite 6 to 64
  148.       set the height of sprite 6 to 48
  149.     else
  150.       set the width of sprite 6 to 40
  151.       set the height of sprite 6 to 30
  152.     end if
  153.   end if
  154.   repeat with c = 1 to gframe
  155.     set the movieTime of sprite 6 to 60 * (c - 1)
  156.     set the locH of sprite 6 to gloch + (gmovh * c)
  157.     updateStage()
  158.   end repeat
  159. end
  160.  
  161. on searchqt
  162.   set the movieRate of sprite 1 to 0
  163.   repeat while the stillDown
  164.     cursor([97, 98])
  165.     set anowpos to integer((mouseH() - gloch - (gmovh / 2)) / gmovh)
  166.     if (anowpos >= 0) and (anowpos <= (gframe - 1)) then
  167.       set the movieTime of sprite 1 to anowpos * 60
  168.       updateStage()
  169.     end if
  170.   end repeat
  171.   cursor(0)
  172. end
  173.  
  174. on indexqtslider
  175.   set gloch to 80
  176.   set gmovh to 64
  177.   set gcount to count(gfindlist)
  178.   if gcount > 8 then
  179.     if (gpage = gpagesu) and (gpagemod > 0) then
  180.       set gmax to gpagemod
  181.     else
  182.       set gmax to 8
  183.     end if
  184.   else
  185.     set gmax to gcount
  186.   end if
  187.   set the locV of sprite 12 to 368
  188.   set the movieRate of sprite 12 to 0
  189.   puppetSprite(12, 1)
  190.   repeat with c = 1 to gmax
  191.     set the movieTime of sprite 12 to value(getAt(gfindlist, ((gpage - 1) * 8) + c) - 1)
  192.     set the locH of sprite 12 to gloch + (gmovh * c) - (gmovh / 2)
  193.     updateStage()
  194.   end repeat
  195.   puppetSprite(12, 0)
  196. end
  197.  
  198. on indexsearchqt
  199.   set gnowpos to integer((mouseH() - gloch) / gmovh) + 1
  200.   if (gnowpos > 0) and (gnowpos <= gmax) then
  201.     set apos to ((gpage - 1) * 8) + gnowpos
  202.     return getAt(gfindlist, apos)
  203.   end if
  204. end
  205.  
  206. on hideface
  207.   set the visible of sprite 48 to 0
  208.   set the visible of sprite 1 to 1
  209.   updateStage()
  210. end
  211.  
  212. on putdata vindex
  213.   if vindex = EMPTY then
  214.     repeat with n in gtemplist
  215.       set apos to n
  216.       set gfilename to line apos of field "filename"
  217.       set ggroupname to line apos of field "group"
  218.       set gframe to line apos of field "frame"
  219.       set gichi to line apos of field "Ichi"
  220.       set gface to line apos of field "face"
  221.       put "filename / " & gfilename & " / Group / " & ggroupname & " / frame / " & gframe & " / Ichi / " & gichi & " / face / " & gface & RETURN
  222.     end repeat
  223.     exit
  224.   else
  225.     set n to value(vindex)
  226.     set gfilename to line n of field "filename"
  227.     set ggroupname to line n of field "group"
  228.     set gframe to line n of field "frame"
  229.     set gichi to line n of field "Ichi"
  230.     set gface to line n of field "face"
  231.     put "filename / " & gfilename & " / Group / " & ggroupname & " / frame / " & gframe & " / Ichi / " & gichi & " / face / " & gface & RETURN
  232.   end if
  233. end
  234.